package com.atwj.dao.impl;

import com.atwj.dao.OrderItemDao;
import com.atwj.entity.OrderItem;

/**
 * @author 吴先森
 * @description:
 * @create 2022-03-31 22:26
 */
public class OrderItemDaoImpl extends baseDao implements OrderItemDao {
    @Override
    public int saveOrderItem(OrderItem orderItem) {
        String sql = "insert into t_order_item(`name`,`count`,`price`,`total_price`,`order_id`) values(?,?,?,?,?)";
        return update(sql, orderItem.getName(), orderItem.getCount(), orderItem.getPrice(), orderItem.getTotalPrice(), orderItem.getOrderId());
    }
}
